[PATCH] Check if `HTTP_X_AMZ_COPY_SOURCE` header is empty
authorSuyash Dongre <suyashd999@gmail.com>
Wed, 20 Aug 2025 17:52:41 +0000 (23:22 +0530)
committerUtkarsh Gupta <utkarsh@debian.org>
Mon, 15 Dec 2025 12:18:10 +0000 (17:48 +0530)
commit0d315000c76e465d6ab0953446ff8618ccb7623a
tree13671ba2063340b83873b0719c5de504508f2d72
parent55f23f3eeee7ca66e7580aec10d40166cb8dedee
[PATCH] Check if `HTTP_X_AMZ_COPY_SOURCE` header is empty

The issue was that the `HTTP_X_AMZ_COPY_SOURCE` header could be present but empty (i.e., an empty string rather than NULL). The  code only checked if the pointer was not NULL, but didn't verify that the string had content. When an empty string was passed to RGWCopyObj::parse_copy_location(), it would eventually try to access name_str[0] on an empty string, causing a crash.

Fixes: https://tracker.ceph.com/issues/72669
Signed-off-by: Suyash Dongre <suyashd999@gmail.com>
Gbp-Pq: Name CVE-2024-47866.patch
src/rgw/rgw_op.cc